﻿$(document).ready(function () {
    $("#MainContent_btn_booking").click(function () {



        JSONWebServiceA("~/Handler/CreateOrder.ashx", { uName: $("#MainContent_hid_uName").val(), uid: $("#MainContent_hid_uid").val(), sDate: $("#MainContent_txt_startDate").val(), eDate: $("#MainContent_txt_endDate").val() }, function (objJSON) {

            switch (objJSON) {
                case "-1":
                    alert("系统错误");
                    break;
                case "1":
                    alert("预定成功");
                    window.location.href = "Pay.aspx";
                    break;

                case "2":
                    alert("预定成功");
                    window.location.href = "Pay.aspx";
                    break;
                case "0":
                    alert("预定失败");
                    break;
                default:
                    break;
            }
        });

    });
})

